home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / AppIconView.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  77 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.
  4.  
  5.     You are free to use all or any parts of the Locus project
  6.     however you wish, just give credit where credit is due.
  7.     The author (Jeremy Slade) shall not be held responsible
  8.     for any damages that result out of use or misuse of any
  9.     part of this project.
  10.  
  11. */
  12.  
  13. /*
  14.     Project: Locus
  15.     
  16.     Class: AppIconView
  17.     
  18.     Description:
  19.  
  20.     The AppIconView is a custom view used to display customs icons, etc, in an Application's AppIcon window.  This class was originally developed to work as a general View class, but it has been modified to work especially for Locus.  The AppIconView automatically installs itself as a subview within a specified icon window view the attachToIcon: method.  You can then assign different icons/images to be displayed in the icon window.
  21.     This view also conforms to the NXDraggingDestination Protocol to receive dragged files from other Apps.  For some reason, this is currently non-functional when used with the actual AppIcon window under NS 3.0.  I don't know if this is a bug in the NXDraggingDestination protocol, or if it is something else...
  22.     
  23.     Original Author: Jeremy Slade
  24.     
  25.     Revision History:
  26.         Created
  27.             V.101    JGS Tue Feb  2 18:50:26 GMT-0700 1993
  28.  
  29. */
  30.  
  31. #ifndef AppIconView_h
  32. #define AppIconView_h
  33.  
  34. #define AppIconView_VERSION     (101)
  35.  
  36.  
  37. #import <appkit/View.h>
  38. #import "Dragging.h"
  39.  
  40.  
  41. @interface AppIconView : View 
  42. {
  43.     char *icon;
  44.     id image;
  45.     BOOL isAttached;
  46. }
  47.  
  48. // Creating, Initializing instances
  49. + initialize;
  50. - init;
  51. - initFrame:(const NXRect *)frameRect;
  52. - free;
  53.  
  54. // Attaching to an Icon window
  55. - attachToIcon:window;
  56. - detachFromIcon;
  57.  
  58. // Setting the Icon/Image to display
  59. - setImage:anImage;
  60. - setIcon:(const char *)name;
  61. - (const char *)icon;
  62. - image;
  63. - drawSelf:(const NXRect *)rects :(int)count;
  64.  
  65. // NXDraggingDestination Protocol
  66. - setDraggingEnabled:(BOOL)flag;
  67. - (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender;
  68. - (NXDragOperation)draggingUpdated:(id <NXDraggingInfo>)sender;
  69. - draggingExited:(id <NXDraggingInfo>)sender;
  70. - (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
  71. - (BOOL)performDragOperation:(id <NXDraggingInfo>)sender;
  72. - concludeDragOperation:(id <NXDraggingInfo>)sender;
  73.  
  74. @end
  75.  
  76. #endif // AppIconView_h
  77.